package com.zyk.scaffold.tcp.enums;

import com.zyk.scaffold.common.utils.StringUtils;

public enum HeartBeatTypeEnum {
    NONE, ACK, REQUEST;

    public static HeartBeatTypeEnum converter(String heartBeatType) {
        if(StringUtils.isEmpty(heartBeatType)){
            return null;
        }
        HeartBeatTypeEnum heartBeatTypeEnum = null;
        try {
            heartBeatTypeEnum = valueOf(heartBeatType);
        } catch (IllegalArgumentException e) {
            e.printStackTrace();
        }
        return heartBeatTypeEnum;
    }
}
